package thinkingJava.chapter11;

import java.util.ArrayList;

class Graminapp extends Apple{}
class Huoop extends Apple {}
class Oppo extends Apple {}
class Iphone extends Apple {}
public class GenericsAndUpcasting {
	public static void main(String[] args) {
		ArrayList<Apple> apples = new ArrayList<Apple>();
		apples.add(new Graminapp());
		apples.add(new Huoop());
		apples.add(new Oppo());
		apples.add(new Iphone());
		for (Apple c : apples) {
			System.out.println(c);
		}
	}

}
